﻿<%@ Page Title="Search Shopping Lists" Language="C#" MasterPageFile="~/Resources/AAMMaster.master"
    AutoEventWireup="true" CodeBehind="searchshoppinglists.aspx.cs" Inherits="LMKJ.searchshoppinglists" %>

<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="form_name">
        Shopping List Management
    </div>
    <table>
        <tr>
            <td>
                Search:
            </td>
            <td>
                <asp:TextBox ID="searchTbx" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:DropDownList ID="searchDdl" runat="server" Enabled="False">
                    <asp:ListItem Selected="True">List ID</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="searchBtn" Text="Search" runat="server" OnClick="searchBtn_Click"
                    CssClass="buttonSearch" />
                <asp:Button ID="showAllBtn" Text="Show All" runat="server" OnClick="showAllBtn_Click"
                    CssClass="buttonShowAll" />
            </td>
        </tr>
    </table>
    <asp:DataList ID="shoppinglistDlist" runat="server" Width="100%">
        <HeaderTemplate>
            <table style="width: 100%">
                <tr>
                    <td>
                        <b>List ID</b>
                    </td>
                    <td>
                        <b>NRIC</b>
                    </td>
                    <td>
                        <b>Volunteer ID</b>
                    </td>
                    <td>
                        <b>Date of Request</b>
                    </td>
                    <td>
                        <b>Date Required</b>
                    </td>
                    <td>
                        <b>Manage</b>
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <asp:Label ID="list_idLbl" runat="server" Text='<%# Eval("List_ID") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="nricLbl" runat="server" Text='<%# Eval("Nric") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="volunteer_idLbl" runat="server" Text='<%# Eval("Volunteer_ID") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="dateLbl" runat="server" Text='<%# Eval("Date") %>'></asp:Label>
                </td>
                <td>
                    <asp:Label ID="date_reqLbl" runat="server" Text='<%# Eval("Date_Req") %>'></asp:Label>
                </td>
                <td>
                    <asp:HyperLink ID="detailsHl" runat="server" Text="View Details" NavigateUrl='<%# "viewshoppinglistdetails.aspx?details="+Eval("List_ID") %>'></asp:HyperLink>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table></FooterTemplate>
    </asp:DataList>
</asp:Content>
